Skip to content

Conversation

@ChrisJBurns
Copy link
Contributor

@ChrisJBurns ChrisJBurns commented Oct 10, 2025

Description

Adds documentation for authentication and authorization, including concepts guides for authN/Z and Cedar policies, plus how-to guides for the CLI and K8s operator.

Merge checklist

Content

  • New pages include a frontmatter section with title and description at a minimum
  • Sidebar navigation (sidebars.ts) updated for added, deleted, reordered, or renamed files
  • (N/A) Redirects added to vercel.json for moved, renamed, or deleted pages (i.e., if the URL slug changed)

Reviews

  • Content has been reviewed for technical accuracy
  • Content has been reviewed for spelling, grammar, and style

Copilot AI review requested due to automatic review settings October 10, 2025 16:28
@vercel
Copy link

vercel bot commented Oct 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-website Ready Ready Preview Comment Nov 3, 2025 5:36pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces initial documentation for authentication and authorization features in ToolHive, covering both CLI and Kubernetes deployment scenarios. The documentation explains how to secure MCP servers using OIDC for authentication and Cedar policies for authorization.

  • Comprehensive authentication and authorization guide for Kubernetes deployments
  • CLI-focused authentication and authorization guide
  • Detailed Cedar policy concepts and configuration documentation
  • Conceptual overview of ToolHive's auth framework
  • Reusable partial files for common auth-related content

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/toolhive/guides-k8s/auth-k8s.mdx Complete guide for setting up auth in Kubernetes with external IdP and service-to-service auth patterns
docs/toolhive/guides-cli/auth.mdx CLI-focused authentication and authorization setup guide
docs/toolhive/concepts/cedar-policies.md Detailed documentation on writing and configuring Cedar authorization policies
docs/toolhive/concepts/authentication-authorization.md Comprehensive conceptual overview of ToolHive's authentication and authorization framework
docs/toolhive/concepts/auth-framework.md Focused conceptual documentation on the auth framework design and benefits
docs/toolhive/_partials/_oidc-prerequisites.md Reusable partial for OIDC prerequisites across auth guides
docs/toolhive/_partials/_basic-cedar-config.md Reusable partial showing basic Cedar policy configuration examples
docs/toolhive/_partials/_auth-troubleshooting.md Reusable partial for common authentication and authorization troubleshooting

ChrisJBurns and others added 4 commits October 29, 2025 12:07
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
Remove inline // comments from JSON code block as they are invalid
JSON syntax and will cause parsing errors. Move explanations to
bullet points above the example for better clarity.
Update all MCPServer YAML examples to use correct CRD field structure:

1. External IdP authentication:
   - Change spec.auth.oidc → spec.oidcConfig
   - Add required type: inline field
   - Nest configuration under inline: key

2. Kubernetes service account authentication:
   - Change spec.auth.oidc → spec.oidcConfig
   - Use type: kubernetes instead of inline
   - Replace clientId with serviceAccount and namespace fields

3. Authorization configuration:
   - Change spec.auth.authorization → spec.authzConfig
   - Add required type: configMap field
   - Update field names: configMapName → name, configMapKey → key

These changes align with the actual ToolHive CRD definitions in
toolhive/cmd/thv-operator/api/v1alpha1/mcpserver_types.go
Document --follow and --proxy flags for the thv logs command to help
users debug authentication issues more effectively:
- --follow: Follow logs in real-time (like tail -f)
- --proxy: View proxy logs instead of container logs
Add a new approach (Approach 2) showing how to use ConfigMaps to share
OIDC configuration across multiple MCPServer resources. This provides:

- Centralized management of OIDC settings
- Consistency across multiple servers
- GitOps-friendly configuration management
- Easier multi-server deployments

Updated section numbering:
- Approach 1: External identity provider (inline config)
- Approach 2: Shared OIDC configuration (ConfigMap)
- Approach 3: Kubernetes service-to-service (service accounts)
Add an info admonition at the beginning of the auth framework concept
document to explicitly clarify that this documentation covers
client-to-MCP-server authentication, not MCP-server-to-backend
authentication.

This distinction helps readers understand:
- What is covered: How clients authenticate to the MCP server
- What is not covered: How MCP servers authenticate to external APIs
  (e.g., GitHub MCP server authenticating to GitHub API)

The note indicates that MCP-server-to-backend authentication will be
covered in separate future documentation.
Revise the "Client support for MCP server authentication" section to
reflect the current state of the MCP ecosystem more accurately:

- Remove outdated claim that "most clients do not support authentication"
- Acknowledge that authentication support varies across clients
- Simplify guidance to recommend looking for clients that support MCP
  authentication standards (OAuth 2.1 and transport-level auth)
- Remove redundant use cases section (already covered elsewhere in docs)
- Remove "Expected evolution" and "Planning for the future" subsections

The revised section is more concise and reflects that while authentication
support is not universal, many clients now support it to varying degrees.
@ChrisJBurns ChrisJBurns changed the title DRAFT: adds start for auth docs adds auth docs Oct 30, 2025
…ken diversity

This updates the authentication framework concepts documentation to:
- Add link to official MCP spec and clarify OAuth resource server role
- Update from OIDC-only to OAuth 2.1/OIDC throughout
- Document support for both JWT and opaque tokens
- Add new "Token validation methods" section explaining local JWT validation
  and remote token introspection (RFC 7662, Google, GitHub)
- Update diagrams to use generic "Access Token" and "Identity Provider"
  instead of "JWT" and "OIDC Provider"
- Update authorization flow from "JWT middleware" to "authentication middleware"
- Clarify automatic token type detection (JWT first, then introspection fallback)
Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
@danbarr danbarr changed the title adds auth docs Add auth docs Nov 3, 2025
@jhrozek jhrozek merged commit 7e95d41 into main Nov 3, 2025
7 checks passed
@jhrozek jhrozek deleted the auth-docs branch November 3, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs needed: authorization framework / OAuth settings

4 participants